package cn.hicard.risk.service.sys.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.hicard.risk.dao.sys.DeptDao;
import cn.hicard.risk.entity.SysDept;
import cn.hicard.risk.service.sys.DeptService;

@Service
public class DeptServiceImpl implements DeptService{
	
	@Autowired
	private DeptDao detpDao;

	@Override
	public void delete(Integer pkDept) throws Exception {
		detpDao.delete(pkDept);
	}

	@Override
	public List<SysDept> getAll() throws Exception {
		return detpDao.getAll();
	}

	@Override
	public SysDept getByPk(Integer pkDept) throws Exception {
		return detpDao.getByPk(pkDept);
	}

	@Override
	public void save(SysDept dept) throws Exception {
		detpDao.save(dept);
	}

	@Override
	public void update(SysDept dept) throws Exception {
		detpDao.update(dept);
	}

	@Override
	public boolean existsInUser(Integer pkDept) throws Exception {
		return detpDao.existsInUser(pkDept);
	}

}
